<?

class Mdl_Nav extends Model {

    function Mdl_Nav() {

        parent::Model();

    }

    function main_dashboard_active() {

        if (strchr($this->uri->uri_string(), 'admin_index')) {

            return TRUE;

        }

        return FALSE;

    }

    function main_write_active() {

        if(strchr($this->uri->uri_string(), 'admin_posts/form') OR
            strchr($this->uri->uri_string(), 'admin_pages/form')) {

            return TRUE;

        }

        return FALSE;

    }

    function write_post_active() {

        if (strchr($this->uri->uri_string(), 'admin_posts/form')) {

            return TRUE;

        }

        return FALSE;

    }

    function write_page_active() {

        if (strchr($this->uri->uri_string(), 'admin_pages/form')) {

            return TRUE;

        }

        return FALSE;

    }

    function main_manage_active() {

        if(strchr($this->uri->uri_string(), 'admin_posts/index') or
            strchr($this->uri->uri_string(), 'admin_pages/index') or
            strchr($this->uri->uri_string(), 'admin_categories/index') or
            strchr($this->uri->uri_string(), 'admin_categories/form') or
            strchr($this->uri->uri_string(), 'admin_comments/index') or
            strchr($this->uri->uri_string(), 'admin_comments/form') or
            strchr($this->uri->uri_string(), 'admin_blogroll/index') or
            strchr($this->uri->uri_string(), 'admin_blogroll/index')) {

            return TRUE;

        }

        return FALSE;

    }

    function post_index_active() {

        if (strchr($this->uri->uri_string(), 'admin_posts/index')) {

            return TRUE;

        }

        return FALSE;

    }

    function page_index_active() {

        if (strchr($this->uri->uri_string(), 'admin_pages/index')) {

            return TRUE;

        }

        return FALSE;

    }

    function category_active() {

        if (strchr($this->uri->uri_string(), 'admin_categories/index') or
            strchr($this->uri->uri_string(), 'admin_categories/form')) {

            return TRUE;

        }

        return FALSE;

    }

    function comment_index_active() {

        if (strchr($this->uri->uri_string(), 'admin_comments/index')) {

            return TRUE;

        }

        return FALSE;

    }

    function blogroll_active() {

        if (strchr($this->uri->uri_string(), 'admin_blogroll/index') or
            strchr($this->uri->uri_string(), 'admin_blogroll/form')) {

            return TRUE;

        }

        return FALSE;

    }

    function main_system_active() {

        if(strchr($this->uri->uri_string(), 'admin_sites/index') or
            strchr($this->uri->uri_string(), 'admin_sites/form') or
            strchr($this->uri->uri_string(), 'admin_users/index') or
            strchr($this->uri->uri_string(), 'admin_users/form') or
            strchr($this->uri->uri_string(), 'admin_visitors') or
            strchr($this->uri->uri_string(), 'admin_spam/index')) {
            
            return TRUE;

        }

        return FALSE;

    }

    function site_active() {

        if (strchr($this->uri->uri_string(), 'admin_sites/index') or
            strchr($this->uri->uri_string(), 'admin_sites/form')) {

            return TRUE;

        }

        return FALSE;

    }

    function spam_active() {

        if (strchr($this->uri->uri_string(), 'admin_spam/index')) {

            return TRUE;

        }

        return FALSE;

    }

    function user_active() {

        if (strchr($this->uri->uri_string(), 'admin_users/index') or
            strchr($this->uri->uri_string(), 'admin_users/form')) {

            return TRUE;

        }

        return FALSE;

    }

    function visitor_active() {

        if (strchr($this->uri->uri_string(), 'admin_visitors')) {

            return TRUE;

        }

        return FALSE;

    }

}

?>